package com.idna.wsconsumer.codegen;

import java.rmi.RemoteException;


import org.apache.axis2.AxisFault;

import com.idna.wsconsumer.codegen.CodeGenStub.*;

public class CodeGenStubClient
{
	static final java.lang.String EP = "http://www.w3schools.com/webservices/tempconvert.asmx?WSDL";
	public static void main(java.lang.String[] args)
	{
		try
		{
			CodeGenStub stub = new CodeGenStub(EP);
			CelsiusToFahrenheit(stub);
		}
		catch (AxisFault e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public static void CelsiusToFahrenheit(CodeGenStub stub)
	{
		try
		{
			CelsiusToFahrenheit request = new CelsiusToFahrenheit();
			request.setCelsius("37");
			CelsiusToFahrenheitResponse response = stub.CelsiusToFahrenheit(request);
			System.out.println("Request: "+request.getCelsius()+" "+request.getClass().getName()+"\n" +
					"Response: "+response.getCelsiusToFahrenheitResult()+" "+response.getClass().getName());
		}
		catch (RemoteException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
